package com.haidao.admin.component.configuration;

import com.haidao.admin.component.api.ApiManager;
import com.haidao.admin.component.configuration.properties.MongoConfigProperties;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Slf4j
@Configuration
public class GlobalConfiguration {

    @Resource
    private MongoConfigProperties mongoConfigProperties;

    @Bean
    @ConditionalOnMissingBean(ApiManager.class)
    public ApiManager getApiManager() {
        return new ApiManager();
    }

}